package example.demo_navi;

import models.Category;
import news.Pracrss;
import news.TestDb;
import utility.DbConnect;
import videos.Main3;
import videos.MainActivity;
import videos.Procmain3;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class Espo_demo extends Activity {

	private Button bt1;
	private Button bt2;
	private Button bt3;
	private Button bt4;
	private TextView tv;
	DbConnect dbc;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_menu);
        dbc=new DbConnect(this);
        bt1=(Button) findViewById(R.id.bt1);
        bt2=(Button) findViewById(R.id.bt2);
    //    bt3=(Button) findViewById(R.id.bt3);
        bt4=(Button) findViewById(R.id.bt4);
        bt1.setOnClickListener(new btclick1());
        bt2.setOnClickListener(new btclick2());
    //    bt3.setOnClickListener(new btclick3());
        bt4.setOnClickListener(new btclick4());
        tv=(TextView) findViewById(R.id.tves);
        tv.setText("E"+ "\n" + "S" + "\n" + "P" + "\n" + "O" + "\n"
        + "R" + "\n" +"T");
        tv.setTextSize(30);
        Typeface tf=Typeface.createFromAsset(getAssets(),"fonts/VNI-Bendigo.ttf");
        tv.setTypeface(tf);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        dbc.insert_cate(new Category("AOE"));
        dbc.insert_cate(new Category("PET"));
        dbc.insert_cate(new Category("League of Legends"));
        dbc.insert_cate(new Category("Counter Strike"));
        dbc.insert_cate(new Category("Tam Quoc"));
        dbc.insert_cate(new Category("Starcraft2"));
        dbc.insert_cate(new Category("Others"));
    }

    private class btclick1 implements OnClickListener{

		public void onClick(View v) {
			// TODO Auto-generated method stub
			Intent in=new Intent(getApplicationContext(), Pracrss.class);
			startActivity(in);
		}
    	
    }
    
    private class btclick2 implements OnClickListener{

		public void onClick(View v) {
			// TODO Auto-generated method stub
			Intent i=new Intent(getApplicationContext(), MainActivity.class);
			startActivity(i);
		}
    	
    }
    
    private class btclick3 implements OnClickListener{

		public void onClick(View arg0) {
			// TODO Auto-generated method stub
			Intent ini=new Intent(getApplicationContext(), TestDb.class);
			startActivity(ini);
		}
    	
    }
    
    private class btclick4 implements OnClickListener{

		public void onClick(View v) {
			// TODO Auto-generated method stub
			Intent in=new Intent(getApplicationContext(), Main3.class);
			startActivity(in);
		}
    	
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_demo_navi, menu);
        return true;
    }
}
